import org.neo.smartcontract.framework.SmartContract;
import org.neo.smartcontract.framework.services.neo.Blockchain;
import org.neo.smartcontract.framework.services.neo.Header;

public class Lock extends SmartContract {
    public static boolean main(int timestamp, byte[] pubkey, byte[] signature) {
        Header header = Blockchain.getHeader(Blockchain.height());
        //Header header = Blockchain.GetHeader(Blockchain.GetHeight());
        /*if (header.timestamp() < timestamp)
            return false;
        return verifySignature(signature, pubkey);*/

        return header.timestamp() >= timestamp && verifySignature(signature, pubkey);
    }
}
